From 4244952130c925c126c248f5059718538cbe9e2b Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Mon, 7 Jun 2010 07:47:30 +0100 Subject: [PATCH] x86: Small APIC timer initialisation cleanup Signed-off-by: Keir Fraser --- xen/arch/x86/apic.c | 16 ++++++---------- xen/arch/x86/smpboot.c | 2 +- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c index 248d373667..c21811f0d5 100644 --- a/xen/arch/x86/apic.c +++ b/xen/arch/x86/apic.c @@ -1064,11 +1064,11 @@ static void __setup_APIC_LVTT(unsigned int clocks) apic_write_around(APIC_TMICT, clocks/APIC_DIVISOR); } -static void __devinit setup_APIC_timer(unsigned int clocks) +static void __devinit setup_APIC_timer(void) { unsigned long flags; local_irq_save(flags); - __setup_APIC_LVTT(clocks); + __setup_APIC_LVTT(0); local_irq_restore(flags); } @@ -1159,8 +1159,6 @@ static int __init calibrate_APIC_clock(void) return result; } -static unsigned int calibration_result; - void __init setup_boot_APIC_clock(void) { unsigned long flags; @@ -1169,18 +1167,16 @@ void __init setup_boot_APIC_clock(void) local_irq_save(flags); - calibration_result = calibrate_APIC_clock(); - /* - * Now set up the timer for real. - */ - setup_APIC_timer(calibration_result); + calibrate_APIC_clock(); + + setup_APIC_timer(); local_irq_restore(flags); } void __devinit setup_secondary_APIC_clock(void) { - setup_APIC_timer(calibration_result); + setup_APIC_timer(); } void disable_APIC_timer(void) diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c index aec3b100a0..6c007afbef 100644 --- a/xen/arch/x86/smpboot.c +++ b/xen/arch/x86/smpboot.c @@ -348,7 +348,7 @@ void start_secondary(void *unused) construct_percpu_idt(cpu); setup_secondary_APIC_clock(); - enable_APIC_timer(); + /* * low-memory mappings have been cleared, flush them from * the local TLBs too. -- 2.30.2